<template>
  <canna-layout
    baseUrl="/canna-web"
    :menuList="menuList"
    logoSmall="https://cdn.ingeek.com/aladdin/logo-small.png"
    logoDark="https://cdn.ingeek.com/aladdin/logo-dark.png"
    ref="cannaLayoutRef"
  >
    <template v-slot:right>
      <div style="height: 100%; padding: 0 20px">
        <a-avatar
          src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
        />leo
      </div>
    </template>
    <router-view></router-view>
  </canna-layout>
</template>
<script lang="ts">
import { defineComponent, ref, provide } from "vue";
import menuList from "./menuList";
export default defineComponent({
  setup() {
    const cannaLayoutRef = ref();
    provide("refreshView", () => {
      cannaLayoutRef.value.refreshView();
    });
    return {
      menuList,
      cannaLayoutRef,
    };
  },
});
</script>
